using Unity.Entities;
using UnityEngine;

public class EnemySpawnerAuthoring : MonoBehaviour
{
    public float timerMax;
    public uint amount;
    public class Baker : Baker<EnemySpawnerAuthoring>
    {
        public override void Bake(EnemySpawnerAuthoring authoring)
        {
            Entity entity = GetEntity(TransformUsageFlags.Dynamic);
            AddComponent(entity, new EnemySpawner
            {
                timerMax = authoring.timerMax,
                amount = authoring.amount,
            });
        }
    }
}

public struct EnemySpawner : IComponentData
{
    public float timer;
    public float timerMax;
    public uint amount;
    public bool finished;
}
